<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="css/answerCardPublic.css">
    <link rel="stylesheet" href="./css/fontstyle.css">
</head>

<body>
    <div class="answer-box">
        <p class="title">新建答题卡<span class="close-icon"></span></p>
        <div class="answer-main">
            <ul>
                <li>
                    大标题：<span class="fl-r"></span>
                    <input id="title" type="text" class="handline-inp" placeholder="2018-2019学年度第一学期期中考试">
                </li>
                <li class="children-s">
                    <div>
                        <span>试题编号:</span><input id="min-num" class="num-inp" type="text" value="5">-<input type="text"
                            class="num-inp" value="20" id="max-num">
                    </div>
                    <div>
                        <span>排列方向:</span>
                        <select id="way">
                            <option value="0">横向</option>
                            <option value="1">纵向</option>
                        </select>
                    </div>
                </li>
                <li class="children-s">
                    <div>
                        <span>每组题数:</span><input type="text" value="5" id="row-num">
                    </div>
                    <div>
                        <span>选项长度:</span>
                        <select id="foreachtype">
                            <option value="tf">TF</option>
                            <option value="tf-icon">&#x2714;&#x2718;</option>
                        </select>
                    </div>
                </li>
            </ul>
        </div>
        <div class="btn-box">
            <input class="save" type="button" value="保存" id="save">
            <input class="cancel" type="button" value="取消">
        </div>
    </div>
    <script src="./js/public.js"></script>
    <script>
        save.onclick = function () {
            var paramObj = {
                title: getNodeval("title"),
                minNum: parseInt(getNodeval("min-num")),
                maxNum: parseInt(getNodeval("max-num")),
                rowNum: parseInt(getNodeval("row-num")),
                foreachtype: getNodeval("foreachtype") === "tf" ? "tf" : "tficon",
                way: parseInt(getNodeval("way")),
                childrenForEach: true
            }
            createTopicCard(paramObj)
        }
    </script>
</body>

</html>